package com.java.star.mall.front.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 订单确认参数类
 */
@Data
public class AckOrderParam implements Serializable {

    private static final long serialVersionUID = 423257750294207954L;

    @ApiModelProperty(value = "购买类型", notes = "0：购物车购买 1:立即购买")
    @NotEmpty(message = "购买类型不能为空")
    @Pattern(regexp = "^([01])$", message = "购买类型值不合法")
    private String orderType;

    @ApiModelProperty(value = "商品id")
    private Integer productId;
}
